package com.gugee.ins.data.collector.mblogger.config;

import com.alibaba.nacos.api.config.annotation.NacosValue;
import lombok.Getter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: luolifeng
 * Date: 2020-12-24 16:46
 */
//@Configuration
@Getter
@Component
public class InsMBloggerConfig {
    /**
     * 大播主收录-消费的收录消息时限,单位分钟
     */
    @NacosValue(value="${ins.data.collector.mBlogger.acceptMsg.cl.maxLimitTime:60}", autoRefreshed = true)
    private  long acceptMsgClMaxLimitTime;

    /**
     * 大播主收录-消费的更新消息时限,单位分钟
     */
    @NacosValue(value="${ins.data.collector.mBlogger.acceptMsg.update.maxLimitTime:60}", autoRefreshed = true)
    private  long acceptMsgUpdateMaxLimitTime;

    @Value(value="${kafka.topics.insMBloggerCl.online}")
    String insMBloggerClOnlineTopic;

    /**
     * 中播主收录-消费的更新消息时限,单位分钟
     */
    @NacosValue(value="${ins.data.collector.middleBlogger.acceptMsg.update.maxLimitTime:60}", autoRefreshed = true)
    long acceptMsgMiddleBloggerUpdateMaxLimitTime;

    /**
     * insMedia kafka topic 优先队列
     */
    @Value(value="${kafka.topics.insMedia.priority}")
    String insMediaPriorityTopic;

    /**
     * insBloggerFollower kafka topic 优先队列
     */
    @Value(value="${kafka.topics.insBloggerFollower.priority}")
    String insBloggerFollowerPriorityTopic;

    /**
     * insMediaPriority 消息重发最大次数
     */
    @NacosValue(value="${ins.data.collector.message.insMediaPriority.retry:1}", autoRefreshed = true)
    int insMediaPriorityRetryTimes;

    /**
     * insBloggerFollowerPriority 消息重发最大次数
     */
    @NacosValue(value="${ins.data.collector.message.insBloggerFollowerPriority.retry:1}", autoRefreshed = true)
    int insBloggerFollowerPriorityRetryTimes;

//    /**
//     *  大博主保存ES主题
//     */
//    @Value(value="${kafka.topics.insMainBlogger2Es.online.online}")
//    String insMainBlogger2EsTopic;


    /**
     * 大播主更新和收录的线程池大小
     */
    @Value(value="${ins.data.threadpools.mBlogger.corePollSize}")
    int corePollSize;
    /**
     * 大播主更新和收录的线程池队列大小
     */
    @Value(value="${ins.data.threadpools.mBlogger.queueSize}")
    int queueSize;

    /**
     * 收录进大播主的粉丝数要求
     */
    @NacosValue(value="${ins.data.mBlogger.clFollowerCounts}", autoRefreshed = true)
    int clFollowerCounts;
}
